package com.esb.transport.protocal;

import java.lang.reflect.Method;

public class Request extends Invocation {

	private String serviceName;
	private String methodName;
	private Object[] arguments;

	public Request() {super(0L);}

	public Request(long id, Method method, Object[] arguments) {
		super(id);
		this.serviceName = ServiceDispatcher.getServiceName(method.getDeclaringClass());
		this.methodName = method.getName();
		this.arguments = arguments;
	}

	public String getServiceName() {
		return serviceName;
	}

	public void setServiceName(String serviceName) {
		this.serviceName = serviceName;
	}

	public String getMethodName() {
		return methodName;
	}

	public void setMethodName(String methodName) {
		this.methodName = methodName;
	}

	public Object[] getArguments() {
		return arguments;
	}

	public void setArguments(Object[] arguments) {
		this.arguments = arguments;
	}
}
